#  coding=utf-8
from .. import db
from .base import BaseModel


class Message(BaseModel):
    __tablename__ = 'message'
    content = db.Column(db.String(300))
    msg_type = db.Column(db.SmallInteger, default=1, doc='1建议 2问题反馈 3其他')
    author_id = db.Column(db.Integer, db.ForeignKey("user.id"), default=0, doc='作者')
    author = db.relationship('User', backref=db.backref('messages'))
